home *** CD-ROM | disk | FTP | other *** search
- /*
- * $RCSfile: logprepare.h,v $
- * $Revision: 1.1.1.1 $
- * $Date: 1996/05/04 21:55:45 $
- */
- #ifndef __LOGPREPARE_H__
- #define __LOGPREPARE_H__
-
- /**********************************************************************
- * EXODUS Database Toolkit Software
- * Copyright (c) 1991 Computer Sciences Department, University of
- * Wisconsin -- Madison
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY OF WISCONSIN --
- * MADISON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.
- * THE DEPARTMENT DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * The EXODUS Project Group requests users of this software to return
- * any improvements or extensions that they make to:
- *
- * EXODUS Project Group
- * c/o David J. DeWitt and Michael J. Carey
- * Computer Sciences Department
- * University of Wisconsin -- Madison
- * Madison, WI 53706
- *
- * or exodus@cs.wisc.edu
- *
- * In addition, the EXODUS Project Group requests that users grant the
- * Computer Sciences Department rights to redistribute these changes.
- **********************************************************************/
-
- /*
- * define the maximum number of PREPARESERVERINFO records
- * in an image
- */
- #define MAXSERVERSINIMAGE 20
-
- /*
- * for distr trans -
- * define the header to the coordinator's prepare log record
- * - this will be the first image
- */
- typedef struct {
-
- UFOUR numServers;
- ONE prepareAndCommit;
- LSN prepareLSN;
- SHORTPID firstLogPid;
- UFOUR logUnique;
- LSN firstLSN;
- UFOUR logRecordCount;
- UFOUR logSpace;
- } COORDPREPAREHDR;
-
- /*
- * for distr trans -
- * define the structure which stores the info about
- * a server in the prepare log record
- */
- typedef struct {
-
- SOCKADDR connectAddr;
- TID tid;
- } PREPARESERVERINFO;
-
- /*
- * define the maximum number of PREPARELOCKINFO records allocated
- * on the stack in server_LogPrepare()
- */
- #define MAXLOCKSONSTACK 100
-
- /*
- * define the maximum number of PREPARELOCKINFO records that
- * can be stored in one image
- */
- #define MAXLOCKINFOINIMAGE (MAX_LOGIMAGE_LEN / sizeof(PREPARELOCKINFO))
-
- /*
- * define the maximum number of VOLIDNAME records allocated
- * on the stack in server_LogPrepare()
- * VOLIDNAME is declared in serverlib/include/volume.h
- */
- #define MAXVOLSONSTACK 100
-
- /*
- * define the maximum number of VOLIDNAME records that
- * can be stored in one image
- */
- #define MAXVOLINIMAGE (MAX_LOGIMAGE_LEN / sizeof(VOLIDNAME))
-
- /*
- * for distr trans -
- * define the header to the server's prepare log record
- * - this will be the first image
- */
- typedef struct {
-
- SOCKADDR coordAddr;
- TID coordTid;
- LSN prepareLSN;
- SHORTPID firstLogPid;
- UFOUR logUnique;
- LSN firstLSN;
- UFOUR logRecordCount;
- UFOUR logSpace;
- } SERVERPREPAREHDR;
-
- /*
- * for distr trans -
- * define the structure which stores the info about
- * a lock in the prepare log record
- */
- typedef struct {
-
- LOCKID lockid;
- LOCKMODE mode;
- } PREPARELOCKINFO;
-
- #endif __LOGPREPARE_H__
-